package HashMap.Nodo.Operaciones.BloqueSwitch;

import HashMap.Nodo.Nodo;
import java.util.List;

public class CasosSeleccion {

    private List<Caso> casosEstandar;
    private CasoDefecto casoDefecto;

    public CasosSeleccion(List<Caso> casosEstandar, CasoDefecto casoDefecto) {
        this.casoDefecto = casoDefecto;
        this.casosEstandar = casosEstandar;
    }

    public String generarCodigoNASM(Nodo nodo) {
        StringBuilder builder = new StringBuilder();
        for (Caso caso : casosEstandar) {
            builder.append(caso.generarCodigoNASM(nodo));
        }
        builder.append(casoDefecto.generarCodigoNASM());
        return builder.toString();
    }
}
